package com.yuwei.module_vehicles.model

import com.bw.lib_common.entity.Res
import com.bw.lib_common.model.BaseRepository
import com.bw.lib_http.OkHttpClientManager
import com.bw.lib_http.entity.*
import com.yuwei.module_vehicles.api.VehiclesService
import retrofit2.http.Body
import retrofit2.http.Path

class VehiclesRepository:BaseRepository<VehiclesService>() {
    override fun createApiServer(): VehiclesService = OkHttpClientManager.retrofitInstance.create(VehiclesService::class.java)

    suspend fun getCarPayments():Res<CarPaymentsEntity> = apiService.getCarPayments()

    suspend fun getProvinces():Res<ProvincesEntity> = apiService.getProvinces()

    suspend fun getVehicles(vehiclesBody: VehiclesBody):Res<VehiclesEntity> = apiService.getVehicles(vehiclesBody)

    suspend fun getDeleteCar(id:Int):Res<String> = apiService.getDeleteCar(id)

    suspend fun getAddPayments(addPaymentsBody: AddPaymentsBody):Res<AddPaymentsEntity> = apiService.getAddPayments(addPaymentsBody)
}